package lab02.test21;

import java.awt.datatransfer.StringSelection;

/**
 * Created by Lenovo on 2017/10/31.
 */
public class Test {
    public static void main(String[] args) {
        String string = "wuqi";
        char special = 'w';

        int number = 0;
        for (int i = 0; i< string.length(); i++){
            if (string.charAt(i) == special){
                number++;
            }
        }

        System.out.println("在字符wuqi中w出现的频率为："+number);
    }
        }
